<?php

// $Id$

require_once('te_vll_invalid_language_code.class.php');


class VL_Language extends Tangra_Class {
	private $id;
	private $code;
	private $en_name;
	private $local_name;


	public function set_id($id) {
		tangra_if_not_int_throw_e($id);

		$this->id = $id;
	}


	public function get_id() {
		return $this->id;
	}


	public function set_code($code) {
		if (ereg("^[a-zA-Z_]{1}[a-zA-Z_]{1,10}$", $code)) {
			$this->code = $code;
		} else {
			throw new TE_VLL_Invalid_Language_Code();
		}
	}


	public function get_code() {
		return $this->code;
	}


	public function set_en_name($en_name) {
		$this->en_name = $en_name;
	}


	public function get_en_name() {
		return $this->en_name;
	}


	public function set_local_name($local_name) {
		$this->local_name = $local_name;
	}


	public function get_local_name() {
		return $this->local_name;
	}
}